import React from 'react';
import { Chart, Point } from 'bizcharts';

type PropField = {
  datas: Record<string, any>;
  xCol: string;
  yCol: string;
  zCol: string;
  height: number;
};
const PointChart: React.FC<PropField> = (props) => {
  const { datas, xCol, yCol, zCol, height } = props;
  return (
    <>
      <Chart height={height} data={datas} autoFit interactions={['legend-highlight', 'brush']}>
        <Point
          position={`${xCol}*${yCol}`}
          color={zCol}
          shape="circle"
          style={{
            fillOpacity: 0.85,
          }}
        />
      </Chart>
    </>
  );
};
export default PointChart;
